{% block extra_block %}
<script>
    function reviewApplyAward(action, id) {
        var dialog = new bkDialog({
            type: 'dialog',
            title: '审核奖项',
            content: action === 1 ? '确认通过该奖项申报？' : '确认驳回该奖项申报？',
            confirmFn: function () {
                $.ajax({
                    url: '{{ SITE_URL }}review_apply_award/',
                    method: 'post',
                    data: {
                        "id": id,
                        "action": action
                    },
                    success: function (response) {
                        if (response['result']) {
                            new bkMessage({
                                message: response['message'],
                                theme: 'success'
                            })
                            applicationTable.ajax.reload(null, false)
                        } else {
                            // 失败处理
                            new bkMessage({
                                message: response['message'],
                                theme: 'error',
                                delay: 3000
                            });
                        }
                    }
                })
            }
        });
        dialog.show();
    }
</script>
{% endblock %}